home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5604 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: fsgm01.fnal.gov!not-for-mail
  2. From: b91926@fsgm01.fnal.gov (David Sachs)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: Converting integer to char/string?
  5. Date: 5 Feb 1996 13:11:21 -0600
  6. Organization: FERMILAB, Batavia, IL
  7. Message-ID: <4f5kop$77c@fsgm01.fnal.gov>
  8. References: <4f5ehf$48i@brtph500.bnr.ca>
  9. Reply-To: sachs@fnal.fnal.gov
  10. NNTP-Posting-Host: fsgm01.fnal.gov
  11. X-Newsreader: NN version 6.5.0 #4 (NOV)
  12.  
  13. Gilbert Banks <gilbertb@bnr.ca> writes:
  14.  
  15. >What is the function and header for converting an integer to char or string?
  16. >I think the header is <stdlib.h>.
  17.  
  18. You can use sprintf to convert a number to a string.
  19.  
  20. I do not know whar you mean by converting an integer to a character. If
  21. you want the character whose numeric value corresponds to the integer,
  22. you can simply do a direct assignment.
  23. -- 
  24. * IRS, IRS, lord of the federal tax, checking all income and every deduction, *
  25. * mailing out form 10 40, penalizing noncompliers, regulating, and auditing.  *
  26. David Sachs - Fermilab, HPPC MS369 - P. O. Box 500 - Batavia, IL 60510
  27. Voice: 1 708 840 3942      Deparment Fax: 1 708 840 3785
  28.